package com.zqg8512.test.web;

import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author zengqianggang
 * @Description Author VPN
 * @Date 2019/9/27 11:14
 * @Version 1.0
 **/
@Controller
public class PageController {

    @RequestMapping(value = "/")
    public String index() {
        return "index";
    }

    @RequestMapping(value = "/index")
    public String index1() {
        return "index";
    }

    @RequestMapping(value = "/page/{pageinfo}")
    public String page(@PathVariable(value = "pageinfo") String pageinfo) {

        if (StringUtils.isBlank(pageinfo)) {
            return "index";
        }
        return pageinfo;
    }

}
